import Vue from 'vue'
import App from './App'
import store from './store'
import router from './router'
import './plugins'
import '@/layouts/export'
/**
 * @author
 * @description 生产环境默认都使用mock，如果正式用于生产环境时，记得去掉
 */

import './icons' //全局可以使用 svg-icon标签
import './globalComponents' //全局组件
import './utils/dialogDrag'

import permission from '@/directive/permission/index.js' // 权限判断指令 : v-has
import checkBtnPermission from '@/utils/permission' // 权限判断函数 ： this.global_checkBtnPermission()
import waves from '@/directive/waves' // Waves directive
import '@/directive/permission/button/index'
//启用highCharts
import HighchartsVue from 'highcharts-vue' //highcharts
Vue.use(HighchartsVue)
Vue.use(permission)
Vue.use(checkBtnPermission)
Vue.use(waves)

if (process.env.NODE_ENV === 'production') {
  const { mockXHR } = require('@/utils/static')
  mockXHR()
}

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: (h) => h(App),
})
